<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>侦听器-侦听对象内容变化成功</title>
  <script src="vue.js"></script>
</head>
<body>
  <script>
    let circle = {
      position: {
        x:0, y:0
      },
      radius: 10
    }
    let vm = new Vue({
      data: circle,
      watch: {
        position: {
          handler(newValue) {
            console.log(`在watch中侦听到：
            位置变化到了(${newValue.x},${newValue.y})`);
          },
          deep: true
        }
      }
    })
    vm.position.x = 3; 
  </script>
</body>
</html>
